package com.zenchn.model;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

public class TSysOauthCode implements Serializable {
    private static final long serialVersionUID = 4507488384979714503L;
    private String authCodeId;

    private String clientId;

    private String accountId;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expiredTime;

    private String authCode;

    private LocalDateTime applyTime;

    private String redirectUri;


    public String getAuthCodeId() {
        return authCodeId;
    }

    public void setAuthCodeId(String authCodeId) {
        this.authCodeId = authCodeId == null ? null : authCodeId.trim();
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId == null ? null : clientId.trim();
    }

    public String getAccountId() {
        return accountId;
    }

    public void setAccountId(String accountId) {
        this.accountId = accountId == null ? null : accountId.trim();
    }

    public LocalDateTime getExpiredTime() {
        return expiredTime;
    }

    public void setExpiredTime(LocalDateTime expiredTime) {
        this.expiredTime = expiredTime;
    }

    public String getAuthCode() {
        return authCode;
    }

    public void setAuthCode(String authCode) {
        this.authCode = authCode == null ? null : authCode.trim();
    }

    public LocalDateTime getApplyTime() {
        return applyTime;
    }

    public void setApplyTime(LocalDateTime applyTime) {
        this.applyTime = applyTime;
    }

    public String getRedirectUri() {
        return redirectUri;
    }

    public void setRedirectUri(String redirectUri) {
        this.redirectUri = redirectUri == null ? null : redirectUri.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", authCodeId=").append(authCodeId);
        sb.append(", clientId=").append(clientId);
        sb.append(", accountId=").append(accountId);
        sb.append(", expiredTime=").append(expiredTime);
        sb.append(", authCode=").append(authCode);
        sb.append(", applyTime=").append(applyTime);
        sb.append(", redirectUri=").append(redirectUri);
        sb.append("]");
        return sb.toString();
    }
}